import environment
import os
import logging

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp.util import run_wsgi_app

from logger.df import views
from logger.xmpp import XMPPHandler
from logger import tasks

application = webapp.WSGIApplication(
    [('/', views.MainPage),
     ('/post', views.PostEntryView),
     ('/tail', views.TailPage),
     ('/clients', views.ClientsPage),
     ('/settings', views.SettingsPage),
     ('/subscriptions', views.SubscriptionPage),
     ('/xmppsend', views.SendXMPP),
     ('/xmppinvite', views.InviteXMPP),
     ('/worker', tasks.Worker),
     ('/__sampledata__', views.SampleData),
     ('/_ah/xmpp/message/chat/', XMPPHandler),
     ],
    debug=True)

def main():
    logging.getLogger().setLevel(logging.DEBUG)
    run_wsgi_app(application)

if __name__ == '__main__':
    main()

